<?php

use yii\helpers\Html;
use yii\widgets\DetailView;
use common\models\Category;
use common\models\Docstatus;
use common\models\Lockstatus;
/* @var $this yii\web\View */
/* @var $model common\models\Doc */

$this->title = $model->title;
$this->params['breadcrumbs'][] = ['label' => '词条', 'url' => ['index']];
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="doc-view">

    <h1><?= Html::encode($this->title) ?></h1>

    <p>
        <?= Html::a('创建', ['create', 'id' => $model->did], ['class' => 'btn btn-primary']) ?>

    </p>

    <?= DetailView::widget([
        'model' => $model,
        'attributes' => [
            // 'did',
            // 'cid',
        	['attribute'=>'cid',
        	'label'=>'分类',
        	'value'=>'category.name',
		
  				
    		],				
            'title',
            'keywords:ntext',
            'summary:ntext',
            'content:ntext',
            'authorname',
            // 'time:datetime',
             ['attribute'=>'time',
             'format'=>['date','php:Y-m-d H:i:s'],
        	],			
            // 'lastedit',
             ['attribute'=>'lastedit',
             'format'=>['date','php:Y-m-d H:i:s'],
        	],			
            'lasteditorname',
            'viewnum',
            'hisedition:ntext',
            'status',
		
            'locked',
        ],
    ]) ?>

</div>
